package com.parking.repository;

import com.parking.entity.ParkingSpace;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface ParkingSpaceRepository extends JpaRepository<ParkingSpace, Long> {
    List<ParkingSpace> findByParkingLotId(Long parkingLotId);
    List<ParkingSpace> findByParkingLotIdAndOccupied(Long parkingLotId, boolean occupied);
    Optional<ParkingSpace> findBySpaceNumberAndParkingLotId(String spaceNumber, Long parkingLotId);
}